package org.fude.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtil {

	private static Calendar calendar = Calendar.getInstance();
	
	public static int getYear(Date date) {
		if(date == null)
			return 0;
		calendar.setTime(date);
		return calendar.get(Calendar.YEAR);
	}
	public static int getMonth(Date date) {
		if(date == null)
			return 0;
		calendar.setTime(date);
		return calendar.get(Calendar.MONTH); 
	}
}
